package com.bd.learning.cglib;

import cn.hutool.extra.cglib.CglibUtil;
import java.util.HashSet;
import java.util.Set;

/**
 * @author zhangjungang
 */
public class TestCglib {

    public static void main(String[] args) {

        SampleBean sampleBean = new SampleBean();
        Person person = new Person();
        person.setFlag(true);
        person.setName("张先生");
        sampleBean.setPerson(person);
        sampleBean.setAge(11);
        sampleBean.setName("xxxx");
        Set<String> set = new HashSet<String>();
        set.add("11");
        set.add("22");
        sampleBean.setSet(set);
        SampleBean copyBean = CglibUtil.copy(sampleBean, SampleBean.class);

        System.out.println(copyBean.toString());

    }

}
